/*************************************************************************
                           Port_in  -  description
                             -------------------
    début                : 28 déc. 2009
    copyright            : (C) 2009 par nico
 *************************************************************************/

//---------- Interface de la classe <Port_in> (fichier Port_in.h) ------
#ifndef PORT_IN_H_
#define PORT_IN_H_

//--------------------------------------------------- Interfaces utilisées
#include <string>
#include <iostream>
#include "pmBox.h"
#include "pmElement.h"
//------------------------------------------------------------- Constantes

//------------------------------------------------------------------ Types

//------------------------------------------------------------------------
// Rôle de la classe <Port_in>
//
//
//------------------------------------------------------------------------

template <class T = double> class Port_in
{
	//----------------------------------------------------------------- PUBLIC

public:
	//----------------------------------------------------- Méthodes publiques
	std::string GetName()
	{
		return m_name;
	}

	std::string GetType()
	{
		return m_element->GetType();
	}

	//-------------------------------------------------Constructor - Destructor

	Port_in (std::string name = "#", pmElement<T>* elementPtr = NULL )
	{
		m_name = name;
		m_element = elementPtr;

#ifdef appDEBUG
		std::cout << " <Port_in>'s constructor called" << std::endl;
#endif
	}

	virtual ~Port_in ( )
	{
	#ifdef appDEBUG
		std::cout << "<Port_in>'s destructor called" << std::endl;
	#endif
	}

protected:
	//----------------------------------------------------- Attributs protégés
	std::string m_name;
	pmElement<T>* m_element;
};



#endif // PORT_IN_H_
